import Vue from 'vue'
import App from './App.vue'
import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import axios from 'axios'
import store from './store'
import qs from "qs"
import ws from './utils/webSocket'
import moment from 'moment'
import './css/app.css'


Vue.config.productionTip = false;
Vue.use(ElementUI);
Vue.use(require('vue-moment'));
// axios.defaults.headers.post['Content-Type'] = "application/x-www-form-urlencoded";
// axios.defaults.headers.put['Content-Type'] = "application/json";
// 全局注册，使用方法为:this.$axios
Vue.prototype.$axios = axios;
Vue.prototype.$qs = qs;
Vue.prototype.$ws=ws;
Vue.prototype.moment=moment;
axios.defaults.baseURL = '/simulation_web';
Vue.filter('dateYMDHMSFormat',function(dateStr,pattern='YYYY-MM-DD HH:mm:ss'){
  return moment(dateStr).format(pattern);
});
new Vue({
  router,
  store: store,
  render: h => h(App),
}).$mount('#app');
